package org.jeecg.modules.wms.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.wms.entity.FinishedGoodsInventoryLog;

import java.util.List;

/**
 * 成品库存变动记录Service接口
 */
public interface IFinishedGoodsInventoryLogService extends IService<FinishedGoodsInventoryLog> {

    /**
     * 分页查询库存变动记录
     */
    IPage<FinishedGoodsInventoryLog> queryInventoryLogList(IPage<FinishedGoodsInventoryLog> page, 
                                                          String inventoryId, 
                                                          String orderNo, 
                                                          Integer operationType,
                                                          String keyword);

    /**
     * 查询指定库存的变动记录
     */
    List<FinishedGoodsInventoryLog> queryLogsByInventoryId(String inventoryId);

    /**
     * 记录库存变动
     */
    void recordInventoryChange(String inventoryId, String orderNo, Integer operationType, 
                              Integer operationQuantity, Integer beforeQuantity, Integer afterQuantity,
                              String operationReason, String relatedDocNo, String operatorName);
}
